<template>
    <div>
        <el-page-header @back="goBack" content="数据库特权信息"> </el-page-header>
        <el-form ref="form" :model="form" label-widtf="80px">
            <el-form-item label="序列号">
                <el-input v-model="form.id"></el-input>
            </el-form-item>
            <el-form-item label="特权名称">
                <el-input v-model="form.name"></el-input>
            </el-form-item>
            <el-form-item label="描述">
                <el-input v-model="form.description"></el-input>
            </el-form-item>
            <el-form-item label="角色">
                <el-input v-model="form.route">                      
                </el-input>
            </el-form-item>
             <el-form-item label="角色名称">
                <el-input v-model="form.routeName">                      
                </el-input>
            </el-form-item>
            <el-form-item label="类型">
                <el-input v-model="form.type">                      
                </el-input>
            </el-form-item>
            <el-form-item label="图标">
                <el-input v-model="form.icon">                      
                </el-input>
            </el-form-item>
            <el-form-item label="隐藏">
                <el-input v-model="form.hidden">                      
                </el-input>
            </el-form-item>
            <el-form-item label="数字">
                <el-input v-model="form.num">                      
                </el-input>
            </el-form-item>
            <el-form-item label="父级ID">
                <el-input v-model="form.parentId">                      
                </el-input>
            </el-form-item>
        </el-form>
        <div style="text-align:right">
            <el-button type="primary" @click="submit">提交</el-button>
        </div>
    </div>
</template>

<script>
import { post } from '@/utils/request';
export default {
   
   data(){
       return {
           content: "新增数据库特权信息",
           form:{}
       };
   },
   methods:{
       submit(){
           let url = "http://120.77.41.127:8888/basePrivilege/saveOrUpdate";
           post(url,this.form).then(resp => {
               this.$message({type:"success",message:resp.message});
               this.goBack();
           });
       },
       goBack(){
           this.$router.go(-1);
       }
   },
   created(){
      this.form = this.$route.query;
  }

};
</script>

<style lang="sass" scoped>

</style>
